/*
 * @Author: Leo.wang wanglizhigs@163.com
 * @Date: 2025-09-05 20:35:41
 * @LastEditors: Leo.wang wanglizhigs@163.com
 * @LastEditTime: 2025-09-05 21:27:38
 * @FilePath: /medical-companion-manage/src/views/Manage/schema.tsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { Table, Button, Space, Divider } from 'ant-design-vue';
import { format } from '@/utils/format'

export const tableSchemas = [
  {
    title: '编号',
    dataIndex: 'id',
    key: 'id',
    align: 'center',
    width: 80,
  },
  {
    title: '手机号',
    dataIndex: 'phone',
    key: 'phone',
    align: 'center',
  },
  {
    title: '姓名',
    dataIndex: 'name',
    key: 'name',
    align: 'center',
  },
  {
    title: '性别',
    dataIndex: 'gender',
    key: 'gender',
    align: 'center',
    customRender({ text, record, index, column }) {
      return text.name;
    }
  },
  {
    title: '角色',
    dataIndex: 'role',
    key: 'role',
    align: 'center',
    customRender({ text, record, index, column }) {
      return text.role;
    }
  },
  {
    title: '创建时间',
    dataIndex: 'createdTime',
    key: 'createdTime',
    align: 'center',
    customRender({text, record, index, column}) {
      return format(text, 'YYYY-MM-DD HH:mm:ss');
    }
  },

];

export const formSchemas = [
  {
    component: 'Input',
    label: 'ID',
    name: 'id',
    dataIndex: 'id',
    vShow: false,
  },
  {
    component: 'InputNumber',
    label: '手机号',
    dataIndex: 'phone',
    name: 'phone',
  },
  {
    component: 'Input',
    label: '姓名',
    dataIndex: 'name',
    name: 'name',
  },
  {
    component: 'InputNumber',
    label: '性别',
    dataIndex: 'gender',
    name: 'gender',
  },
  {
    component: 'InputNumber',
    label: '角色',
    dataIndex: 'role',
    name: 'role',
  },
];
